<!--

    Copyright © 2016-2025 The Thingsboard Authors

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<mat-card appearance="outlined">
  <mat-card-header>
    <mat-card-title>
      <span class="mat-headline-5" translate>getting-started.guide.info-title</span>
    </mat-card-title>
  </mat-card-header>
  <mat-card-content>
    <div class="tb-form-panel no-border no-padding">
      <div class="info-container flex flex-col gap-4">
        <span class="content info" translate>getting-started.guide.info-text</span>
        <a class="content read-more" href="https://thingsboard.io/docs/mqtt-broker" translate>action.read-more</a>
        <span class="version">{{"getting-started.guide.current-version" | translate}} {{currentReleaseVersion}}</span>
        <section class="flex flex-row gap-2">
          @for (action of actions; track action) {
            <button mat-stroked-button color="primary" (click)="navigateNewTab(action)">
              <span translate>{{action.title}}</span>
            </button>
          }
        </section>
      </div>
    </div>
  </mat-card-content>
</mat-card>

<mat-card appearance="outlined">
  <mat-card-header>
    <mat-card-title>
      <span class="mat-headline-5" translate>getting-started.guide.guide-title</span>
    </mat-card-title>
  </mat-card-header>
  <mat-card-content>
    <div class="tb-form-panel no-border no-padding">
      <span class="content info" translate>getting-started.guide.guide-text</span>
      <div class="guides-container">
        @for (guide of guides; track guide) {
          <div class="flex flex-col items-center gap-2"
               (click)="navigate(guide)">
            <div class="guide">
              <img [src]="guide.img" [alt]="guide.subtitle">
              <span translate>{{guide.subtitle}}</span>
            </div>
            <span style="font-weight: 500" translate>{{guide.title}}</span>
          </div>
        }
      </div>
    </div>
  </mat-card-content>
</mat-card>

<mat-card appearance="outlined">
  <mat-card-header>
    <mat-card-title>
      <span class="mat-headline-5" translate>getting-started.guide.docs-title</span>
    </mat-card-title>
  </mat-card-header>
  <mat-card-content>
    <div class="tb-form-panel no-border no-padding">
      <span class="content info" translate>getting-started.guide.docs-text</span>
      <div class="guides-container">
        @for (guide of docs; track guide) {
          <div class="flex flex-col items-center gap-2"
            (click)="navigateNewTab(guide)">
            <div class="guide">
              <img [src]="guide.img" [alt]="guide.title">
              <span class="doc-title" translate>{{guide.title}}</span>
            </div>
          </div>
        }
      </div>
    </div>
  </mat-card-content>
</mat-card>

<mat-card appearance="outlined">
  <mat-card-header>
    <mat-card-title>
      <span class="mat-headline-5" translate>getting-started.guide.mqtt-features-title</span>
    </mat-card-title>
  </mat-card-header>
  <mat-card-content>
    <div class="tb-form-panel no-border no-padding">
      <span class="content info" translate>getting-started.guide.mqtt-features-text</span>
      <div class="guides-container">
        @for (guide of features; track guide) {
          <div class="flex flex-col items-center gap-2"
            (click)="navigateNewTab(guide)">
            <div class="guide">
              <img [src]="guide.img" [alt]="guide.title">
              <span class="doc-title" translate>{{guide.title}}</span>
            </div>
          </div>
        }
      </div>
    </div>
  </mat-card-content>
</mat-card>
